--TEST--
PHP built-in file testing functions
--FILE--
<?php
/**
 * Test for PHP built-in file functions (is_file(), is_dir(), is_link()...)
 *
 * PHP version 5
 *
 * @category  Stream
 * @package   Stream_Iterate
 * @author    Philippe Jausions <Philippe.Jausions@11abacus.com>
 * @copyright 2008 by 11abacus / Philippe Jausions
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD License
 * @link      http://pear.11abacus.com/package/Stream_Iterate
 */

/**
 * Required package to test
 */
require_once 'Stream/Iterate.php';

/**
 * Main
 */

// Register protocol
stream_wrapper_register('foreach', 'Stream_Iterate');

// Create the context for the stream
$context = stream_context_create(array('foreach' => array(
                                 'subject' => array('abc', 123))));
// Path
$file = 'foreach://subject?toString=serialize';

$functions = array(
    'is_file',
    'is_dir',
    'is_executable',
    'is_link',
    'is_readable',
    'is_writable',
    'is_writeable',
);

foreach ($functions as $f) {
    echo $f.'='.($f($file))."\n";
}

?>
--EXPECT--
is_file=1
is_dir=
is_executable=
is_link=
is_readable=1
is_writable=
is_writeable=
